﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using cart.service;

namespace cart.web.Modules
{
    public partial class hot1 : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            dataBinder();
        }

        protected void dataBinder() 
        {
            productService ps = new productService();

            ArrayList isHotList = ps.getProductByType("isHot", 6);
            this.dlIsHot.DataSource = isHotList;
            this.dlIsHot.DataBind();

            ArrayList isCommendList = ps.getProductByType("IsCommend", 6);
            this.dlIsCommend.DataSource = isCommendList;
            this.dlIsCommend.DataBind();

            ArrayList isSpecialOfferList = ps.getProductByType("IsSpecialOffer", 6);
            this.dlIsSpecialOffer.DataSource = isSpecialOfferList;
            this.dlIsSpecialOffer.DataBind();

            ArrayList isNewList = ps.getProductByType("isNew", 6);
            this.dlIsNew.DataSource = isNewList;
            this.dlIsNew.DataBind();
        
        }
    }
}